#include "io_control.h"
#include "special_io.h"
#include "rclcpp/rclcpp.hpp"
#include <vector>
#include <string>

int main(int argc, char *argv[])
{
    setlocale(LC_ALL, "");
    rclcpp::init(argc, argv);
    auto node = std::make_shared<io_module::IoControl>(rclcpp::NodeOptions());
    // SpecialIo special_io;
    bool ret = node->init();
    // special_io.init();
    if (!ret)
    {
        DEBUG_OUT("main: io_control.init failed");
    }

    rclcpp::executors::MultiThreadedExecutor executor(
        rclcpp::ExecutorOptions(), 
        20  // 线程数
    );
    
    executor.add_node(node);
    executor.spin();
    
    rclcpp::shutdown();
    return 0;
}
